// 非标曲线映射
import React from 'react';
import { Menu } from 'antd';
import { ContentPackage } from '../../../comps';
import LineCurveSpecific from './lineCurveSpecific';
import LineCurveDefault from './lineCurveDefault';
class NonstandardCurveMap extends React.Component {
  state = {
    selMenuItem: '1', // teb默认选中
  };

  //初始化函数
  componentDidMount() {}

  //teb切换响应
  tebOnchange = (val) => {
    this.setState({
      selMenuItem: val.key,
    });
  };

  render() {
    const { selMenuItem } = this.state;
    return (
      <ContentPackage
        title='非标曲线映射'
        contentHtml={
          <div>
            <div style={{ marginTop: '10px' }}>
              <Menu
                onClick={(val) => {
                  this.tebOnchange(val);
                }}
                defaultSelectedKeys={[selMenuItem]}
                mode='horizontal'
              >
                <Menu.Item key='1'>折现曲线（默认）</Menu.Item>
                <Menu.Item key='2'>折现曲线（特定）</Menu.Item>
              </Menu>
            </div>
            {selMenuItem == 1 && (
              <div>
                <LineCurveDefault />
              </div>
            )}
            {selMenuItem == 2 && (
              <div>
                <LineCurveSpecific />
              </div>
            )}
          </div>
        }
      />
    );
  }
}

export default NonstandardCurveMap;
